From 6f23098005f3a7b677f8e067d1bcdb46990b4c05 Mon Sep 17 00:00:00 2001 From: Travis Betak Date: Mon, 5 Mar 2007 16:22:21 -0600 Subject: [PATCH] [SVM] Clear VMCB's EFER.LME when guest disables paging Since the guest's CR0.PG is always set (in shadow paging), EFER.LME must be cleared along with EFER.LMA when the guest is disabling paging. Signed-off-by: Travis Betak --- xen/arch/x86/hvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 01d7a41d2f..40910395e0 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1787,7 +1787,7 @@ static int svm_set_cr0(unsigned long value) { if ( svm_long_mode_enabled(v) ) { - vmcb->efer &= ~EFER_LMA; + vmcb->efer &= ~(EFER_LME | EFER_LMA); v->arch.hvm_svm.cpu_shadow_efer &= ~EFER_LMA; } /* we should take care of this kind of situation */ -- 2.30.2